const path = require("path");

const resolve = (dir) => {
  return path.join(__dirname, dir);
};

module.exports = {
  publicPath: "./",
  outputDir: "bms",
  lintOnSave: false,
  chainWebpack: (config) => {
    config.resolve.alias.set("@", resolve("src"));
  },
  productionSourceMap: false,
  devServer: {
    port: "8080",
    host: "localhost",
    proxy: {
      api: {
        // http://emc9m9vddwjc.ngrok.xiaomiqiu123.top/login
        // target: 'https://emc9m9vddwjc.ngrok.xiaomiqiu123.top',
        target: "http://x15wywe2l9f7.xiaomiqiu.com",
        changeOrigin: true,
        secure: false,
        ws: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
};
